﻿using System;
using fastCSharp;
using fastCSharp.code.cSharp;

namespace diantou.dataModel.path
{
    /// <summary>
    /// 收藏URL
    /// </summary>
    public struct favorite
    {
        /// <summary>
        /// 收藏标识
        /// </summary>
        public int Id;

        /// <summary>
        /// 格式化URL
        /// </summary>
        /// <param name="name">页面名称/类型</param>
        /// <returns></returns>
        private webView.hashUrl get(string name)
        {
            return new webView.hashUrl { Path = "/favorite/" + name + ".html", Query = "favoriteId=" + Id.toString() };
        }
        /// <summary>
        /// 首页
        /// </summary>
        public webView.hashUrl Index
        {
            get { return get("index"); }
        }
        /// <summary>
        /// 关注者
        /// </summary>
        public webView.hashUrl Focus
        {
            get { return get("focus"); }
        }
        /// <summary>
        /// 日志
        /// </summary>
        public webView.hashUrl Log
        {
            get { return get("log"); }
        }
        /// <summary>
        /// 相关收藏
        /// </summary>
        public webView.hashUrl Favorite
        {
            get { return get("favorite"); }
        }
    }
}